package person.zjh.kaoyansharehub.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import person.zjh.kaoyansharehub.pojo.Category;
import person.zjh.kaoyansharehub.result.Result;
import person.zjh.kaoyansharehub.service.CategoryService;

import java.util.List;

/**
 * @description: TODO
 * @author 郑佳豪
 * @date 2025/2/15 16:08
 * @version 1.0
 */
@RestController
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/front/category")
public class CategoryController {


    private final CategoryService categoryService;

    @RequestMapping("/selectAllCategory")
    public Result<List<Category>> selectAllCategory(){
        return Result.success(categoryService.selectAllCategory());
    }
}
